import Vue from 'vue'
Vue.directive('loadmore', {
  bind(el, binding) {
    const selectDOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap')
    selectDOM.addEventListener('scroll', function() {
      const flag = this.scrollHeight - this.scrollTop - this.clientHeight <= 0
      if (flag) {
        binding.value()
      }
    })
  }
})
